{layout name="layout/default" /}
<div class="panel panel-default panel-intro">
  <div class="panel-heading">
    <div class="panel-lead"><em>{$nav_title.title}</em>{$nav_title.remark}</div>
  </div>
  <div class="panel-body" id="contents">
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane fade active in">
        <div class="widget-body no-padding">
          <div class="bootstrap-table">
            <div class="fixed-table-toolbar">
              <div class="columns-right pull-right" style="margin-top:10px;">
                <form class="form-inline form-commonsearch nice-validator n-default" method="post" action="">
                  <input class="form-control" placeholder="搜索" type="text" name="wd">
                  <button type="submit" class="btn btn-default ajax-posturl"  title="普通搜索"  target-form="form-commonsearch"><i class="glyphicon glyphicon-search"></i></button>
                </form>
              </div>            
               <div class="pull-right search">
                <select name="status" class="form-control" type="get-select" style="margin:0 0 0 10px;">
                  <option value="{:admin_url('admin/gb/index')}">回复状态</option>
                  <option value="{:admin_url('admin/gb/index',array('wd'=>$wd,'status'=>$status,'cid'=>$cid,'vid'=>$vid,'uid'=>$uid,'intro'=>1,'type'=>$type,'order'=>$order))}" {eq name="intro" value="1"}selected{/eq}>未回复</option>
<option value="{:admin_url('admin/gb/index',array('wd'=>$wd,'status'=>$status,'cid'=>$cid,'vid'=>$vid,'uid'=>$uid,'intro'=>2,'type'=>$type,'order'=>$order))}" {eq name="intro" value="2"}selected{/eq}>已回复</option>
                </select>
              </div>             
              <div class="pull-right search">
                <select name="status" class="form-control" type="get-select" style="margin:0 0 0 10px;border-right:none">
                  <option value="{:admin_url('admin/gb/index')}">留言状态</option>
<option value="{:admin_url('admin/gb/index',array('wd'=>$wd,'status'=>1,'cid'=>$cid,'vid'=>$vid,'uid'=>$uid,'intro'=>$intro,'type'=>$type,'order'=>$order))}" {eq name="status" value="1"}selected{/eq}>显示</option>
<option value="{:admin_url('admin/gb/index',array('wd'=>$wd,'status'=>2,'cid'=>$cid,'vid'=>$vid,'uid'=>$uid,'intro'=>$intro,'type'=>$type,'order'=>$order))}" {eq name="status" value="2"}selected{/eq}>隐藏</option>
                </select>
              </div>
               <div class="pull-right search">
                <select name="status" class="form-control" type="get-select" style="margin:0 0 0 10px;border-right:none">
                  <option value="{:admin_url('admin/gb/index')}">留言类型</option>
                  {volist name="gb_type" id="vo"}
                  <option value="{:admin_url('admin/gb/index',array('wd'=>$wd,'status'=>$status,'cid'=>$key,'vid'=>$vid,'uid'=>$uid,'intro'=>$intro,'type'=>$type,'order'=>$order))}" {eq name="key" value="$cid"}selected{/eq}>{$vo}</option>
                  {/volist}
                </select>
              </div>    
              
              <div class="bs-bars pull-left">
                <div id="toolbar" class="toolbar"><a href="{:admin_url('admin/gb/index')}" class="btn btn-primary ajax-url"><i class="fa fa-refresh"></i> </a> <a  url="{:admin_url('admin/gb/status',array('status'=>1))}" target-form="ids" class="confirm btn btn-info btn-disabled ajax-post disabled"><i class="fa fa-unlock"></i> 显示</a> <a  url="{:admin_url('admin/gb/status',array('status'=>0))}" target-form="ids" class="confirm btn btn-warning btn-disabled ajax-post disabled"><i class="fa fa-lock"></i> 隐藏</a> <a  url="{:admin_url('admin/gb/del')}" target-form="ids" class="confirm btn btn-danger btn-del btn-disabled ajax-post disabled"><i class="fa fa-trash"></i> 删除</a> <span id="selectedChks" style="display:none">已选择<strong></strong>记录</span> </div>
              </div>
            </div>
          </div>
          <div class="fixed-table-container" style="padding-bottom: 0px;">
            <div class="fixed-table-body">
              <form class="ids">
                <table id="table" class="table table-striped table-bordered table-hover" style="margin-top: 0px;" width="100%">
                  <thead>
                    <tr style="height:45px;">
                      <th class="bs-checkbox "><input name="btSelectAll" type="checkbox"></th>
                      <th style="text-align:center;vertical-align: middle;">{eq name="orders" value="gb_id desc"}<a href="{:admin_url('admin/gb/index',array('wd'=>$wd,'status'=>$status,'cid'=>$cid,'vid'=>$vid,'uid'=>$uid,'intro'=>$intro,'type'=>'gb_id','order'=>'asc'))}" class="btn-link sort ajax-url">编号 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:admin_url('admin/gb/index',array('wd'=>$wd,'status'=>$status,'cid'=>$cid,'vid'=>$vid,'uid'=>$uid,'intro'=>$intro,'type'=>'gb_id','order'=>'desc'))}" class="btn-link sort ajax-url">编号 <i class="fa fa-angle-down"></i></a>{/eq}</th>
              <th style="text-align:center;vertical-align: middle;">留言类型</th>
              <th style="text-align:center;vertical-align: middle;">会员昵称</th>
              <th style="text-align:center;vertical-align: middle;">留言内容</th>
              <th style="text-align:center;vertical-align: middle;">留言IP</th>
              <th style="text-align:center;vertical-align: middle;">{eq name="orders" value="gb_addtime desc"}<a href="{:admin_url('admin/gb/index',array('wd'=>$wd,'status'=>$status,'cid'=>$cid,'vid'=>$vid,'uid'=>$uid,'intro'=>$intro,'type'=>'gb_addtime','order'=>'asc'))}" class="btn-link sort ajax-url">留言时间 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:admin_url('admin/gb/index',array('wd'=>$wd,'status'=>$status,'cid'=>$cid,'vid'=>$vid,'uid'=>$uid,'intro'=>$intro,'type'=>'gb_addtime','order'=>'desc'))}" class="btn-link sort ajax-url">留言时间 <i class="fa fa-angle-down"></i></a>{/eq}</th>
              <th style="text-align:center;vertical-align: middle;">留言置顶</th>
              <th style="text-align:center;vertical-align: middle;">留言状态</th>
              <th style="text-align:center;vertical-align: middle;">相关操作</th>
                    </tr>
                  </thead>
            <tbody>
                  {notempty name="list"}
                  {volist name="list" id="vo"}
                <tr>
                <td class="bs-checkbox"><input data-index="{$vo['gb_id']}" name="id[]" type="checkbox"  value="{$vo['gb_id']}"></td>
                <td style="text-align:center;vertical-align: middle;">{$vo['gb_id']}</td>
                <td style="text-align:center;vertical-align: middle;">{$gb_type[$vo['gb_cid']]}</td>
                <td style="text-align:center;vertical-align: middle;">{empty name='vo.userid'}游客：{$vo.gb_nickname|msubstr=0,5}{else /}<a href="{:admin_url('admin/gb/index',array('uid'=>$vo['userid'],'type'=>$type,'order'=>$order))}" class="btn-link">{notempty name='vo.nickname'}{$vo.nickname|msubstr=0,5}{else /}{$vo.username|msubstr=0,5}{/notempty}</a>{/empty}</td>
                <td style="text-align:center;vertical-align: middle;">{$vo.gb_content|msubstr=0,25,'..'}</td>
                <td style="text-align:center;vertical-align: middle;">{$vo.gb_ip|long2ip}</td>
                <td style="text-align:center;vertical-align: middle;">{$vo.gb_addtime|date='Y-m-d H:i:s',###}</td>
                <td style="text-align:center;vertical-align: middle;">	
                {eq name="vo.gb_oid" value="1"} <a class="btn btn-xs btn-warning ajax-get" url="{:admin_url('admin/gb/order',array('id'=> $vo['gb_id'],'oid'=>0))}">置顶</a>{else /}<a class="btn btn-xs btn-default ajax-get" url="{:admin_url('admin/gb/order',array('id'=> $vo['gb_id'],'oid'=>1))}">正常</a>{/eq}
               </td>                
                <td style="text-align:center;vertical-align: middle;">	
                {eq name="vo.gb_status" value="1"} <a class="btn btn-info btn-xs btn-success ajax-get" url="{:admin_url('admin/gb/status',array('id'=> $vo['gb_id'],'status'=>0))}">显示</a>{else /}<a class="btn btn-info btn-xs btn-danger ajax-get" url="{:admin_url('admin/gb/status',array('id'=> $vo['gb_id'],'status'=>1))}">隐藏</a>{/eq}
               </td>
                <td style="text-align:center;vertical-align: middle;"> 
                {notempty name='vo.gb_intro'}
                <a href="javascript:;" data-url="{:admin_url('admin/gb/edit',array('id'=> $vo['gb_id']))}"  data-name="编辑评论" class="btn btn-success btn-edit btn-detail btn-xs" data-width="100%" data-height="100%" data-offset="0px"><i class="fa fa-pencil"></i> 编辑</a>
                {else /}
                 <a href="javascript:;" data-url="{:admin_url('admin/gb/edit',array('id'=> $vo['gb_id']))}"  data-name="编辑评论" class="btn btn-default btn-edit btn-detail btn-xs" data-width="100%" data-height="100%" data-offset="0px"><i class="fa fa-pencil"></i> 回复</a>
                 {/notempty}              
                 <a url="{:admin_url('admin/gb/del' , array('id' => $vo['gb_id']))}" class="confirm btn btn-danger btn-xs confirm ajax-get"><i class="fa fa-trash-o"></i> 删除</a>
                </td>
{/volist}   
                  {else/}
                  <tr>
                    <td style="text-align:center;vertical-align: middle;" colspan="10" >抱歉，没有找到相关内容！</td>
                  </tr>
                  {/notempty}
                  </tbody>
 </table>
              </form>
            </div>
            {gt name="list->lastPage()" value="1"}
            <div class="fixed-table-pagination" style="overflow:hidden">
              <div class="pull-left pagination-detail"><span class="pagination-info">共{$list->total()}条数据 {$list->currentPage()}/{$list->lastPage()} </span><span class="page-list">每页显示 {$list->listRows()} 条数据</span></div>
              <div class="pull-right pagination">
                <ul class="pagination">
                  {$page}
                </ul>
              </div>
            </div>
            {/gt}
          </div>
        </div>
        <div class="clearfix"></div>
      </div>
    </div>
  </div>
</div>
</div>
